<?php
namespace Admin\Models\ims;
use Admin\Models\BaseModel;

class XHImsProdIn extends BaseModel
{

    /**
     *
     * @var integer
     * @Primary
     * @Column(type="integer", length=11, nullable=false)
     */
    public $iPInId;

    /**
     *
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $iProdId;

    /**
     *
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $iTypeId;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $sProdCode;

    /**
     *
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $iBoxId;

    /**
     *
     * @var integer
     * @Column(type="integer", length=4, nullable=true)
     */
    public $iState;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $sRemark;

    /**
     *
     * @var integer
     * @Column(type="integer", length=4, nullable=true)
     */
    public $bDelete;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $tCreateDate;

    /**
     *
     * @var integer
     * @Column(type="integer", length=20, nullable=true)
     */
    public $iCreateUserId;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $tLastModifyDate;

    /**
     *
     * @var integer
     * @Column(type="integer", length=20, nullable=true)
     */
    public $iLastModifyUserId;


    /**
     * 采购价
     *
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     *
     * create by dale 20180424
     */
    public $iInPrice;

    /**
     * 关联归还
     * @var integer
     * create by xjq 20180530
     */
    public $iLRTId;

    /**
     * Initialize method for model.
     */
    public function initialize()
    {
        $this->setSource("XHIms_ProdIn");
    }

    /**
     * Returns table name mapped in the model.
     *
     * @return string
     */
    public function getSource()
    {
        return 'XHIms_ProdIn';
    }

    /**
     * Allows to query a set of records that match the specified conditions
     *
     * @param mixed $parameters
     * @return XHImsProdIn[]|XHImsProdIn|\Phalcon\Mvc\Model\ResultSetInterface
     */
    public static function find($parameters = null)
    {
        return parent::find($parameters);
    }

    /**
     * Allows to query the first record that match the specified conditions
     *
     * @param mixed $parameters
     * @return XHImsProdIn|\Phalcon\Mvc\Model\ResultInterface
     */
    public static function findFirst($parameters = null)
    {
        return parent::findFirst($parameters);
    }

}
